package code.util

import org.apache.commons.lang3.StringEscapeUtils
import xml.Unparsed
import org.squeryl.customtypes.LongField

/**
 * Created by IntelliJ IDEA.
 * User: cgeheran
 * Date: 4/15/12
 * Time: 11:39 PM
 * To change this template use File | Settings | File Templates.
 */

trait WebUtil {
  def htmlEntityDecode(str: String): Unparsed = {
    Unparsed(StringEscapeUtils.unescapeHtml4(StringEscapeUtils.unescapeHtml4(str)))
  }

  def zeroPadId(id: Long): String = {
    "%05d".format(id)
  }
}